package com.qianguo.shop.entity;

import android.os.Parcel;
import android.os.Parcelable;

import com.eva.androidlibrary.api.entity.BaseBean;

/**
 * @author eva
 * @date 15/11/29
 */
public class Contact extends BaseBean implements Parcelable {

    private int contactId;
    private int userId;

    private String time; //yyyy-MM-dd HH:mm:ss
    private String avatarUrl;
    private String name;
    private String lastMessage;
    private String lastOrderCode;
    private String lastOrderStatus;

    protected Contact(Parcel in) {
        contactId = in.readInt();
        userId = in.readInt();
        avatarUrl = in.readString();
        name = in.readString();
        lastMessage = in.readString();
        lastOrderCode = in.readString();
        lastOrderStatus = in.readString();
    }

    public Contact() {}

    public static final Creator<Contact> CREATOR = new Creator<Contact>() {
        @Override
        public Contact createFromParcel(Parcel in) {
            return new Contact(in);
        }

        @Override
        public Contact[] newArray(int size) {
            return new Contact[size];
        }
    };

    public int getContactId() {
        return contactId;
    }

    public void setContactId(int contactId) {
        this.contactId = contactId;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getLastMessage() {
        return lastMessage;
    }

    public void setLastMessage(String lastMessage) {
        this.lastMessage = lastMessage;
    }

    public String getLastOrderCode() {
        return lastOrderCode;
    }

    public void setLastOrderCode(String lastOrderCode) {
        this.lastOrderCode = lastOrderCode;
    }

    public String getLastOrderStatus() {
        return lastOrderStatus;
    }

    public void setLastOrderStatus(String lastOrderStatus) {
        this.lastOrderStatus = lastOrderStatus;
    }

    public String getAvatarUrl() {
        return avatarUrl;
    }

    public void setAvatarUrl(String avatarUrl) {
        this.avatarUrl = avatarUrl;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(contactId);
        dest.writeInt(userId);
        dest.writeString(avatarUrl);
        dest.writeString(name);
        dest.writeString(lastMessage);
        dest.writeString(lastOrderCode);
        dest.writeString(lastOrderStatus);
    }
}
